// Author: wsfuyibing <682805@qq.com>
// Date: 2025-06-12

package responses

import (
	"server/app/http/models"
	"server/app/kind"
)

// ArcadePondSeatResponse
// 鱼塘钓位信息.
type ArcadePondSeatResponse struct {
	Id          int64
	ArcadeId    kind.ArcadeId
	PondId      int64
	Enabled     kind.Enabled
	EnabledText string
	Sort        int
	Name        string

	// User
	// 谁在钓位上.
	User *UserResponse `json:",omitempty"`
}

// With
// 数据绑定.
func (o *ArcadePondSeatResponse) With(m *models.ArcadePondSeat) *ArcadePondSeatResponse {
	o.Id = m.Id
	o.ArcadeId = m.ArcadeId
	o.PondId = m.PondId
	o.Enabled = m.Enabled
	o.EnabledText = m.Enabled.Text()
	o.Sort = m.Sort
	o.Name = m.Name
	return o
}

// WithUser
// 绑定钓位.
func (o *ArcadePondSeatResponse) WithUser(m *models.Users) *ArcadePondSeatResponse {
	if m != nil {
		o.User = (&UserResponse{}).With(m)
	}
	return o
}
